package com.bdqn.Logger;


import org.apache.log4j.Logger;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;

public class ErrorLogger {
    private static  final Logger log=Logger.getLogger(ErrorLogger.class);
    @AfterReturning(pointcut ="execution(* service.UserService.*(..))" )
    public void afterThrowing(JoinPoint jp,RuntimeException e){
        System.out.println(jp.getSignature().getName()+"方法发生异常"+e);
    }
}
